﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Navigation;
using Microsoft.Phone.Controls;
using Microsoft.Phone.Shell;
using TheDrinksApp.Models;
using TheDrinksApp.Database;

namespace TheDrinksApp.Screen
{
    public partial class ChooseCategoryScreen : UserControl
    {
        private MainPage mainPage;
        public ChooseCategoryScreen(MainPage main)
        {
            InitializeComponent();
            mainPage = main;
        }

        private void lstCategory_Tap(object sender, System.Windows.Input.GestureEventArgs e)
        {
            Util.currentOrder = new CurrentOrderDAO();
            Util.currentOrder.category = (CatergoryDAO)lstCategory.SelectedItem;
            mainPage.ShowPage(PAGE.SEARCH_SCREEN);
        }

        private void searchArea_Tap(object sender, System.Windows.Input.GestureEventArgs e)
        {
            Util.currentOrder = new CurrentOrderDAO();
            mainPage.ShowPage(PAGE.SEARCH_SCREEN);
        }
    }
}
